// 创建路由对象
import { createRouter, createWebHashHistory } from 'vue-router';
import Login from '../pages/BaseLogin.vue';
import Home from '../pages/BaseHome.vue';
import Lists from '../pages/BaseLists.vue';
const routes = [
    // 重定向
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: '/login',
        name: 'login',
        component: Login
    },
    {
        path: '/home',
        name: 'home',
        component: Home
    },
    {
        path: '/lists',
        name: 'lists',
        component: Lists
    }
]
export default createRouter({
    // 路由模式, hash 模式 和 history 模式
    history: createWebHashHistory(),
    routes
});